#ifndef _INFRA_DEFS_H_
#define _INFRA_DEFS_H_

#include "infra_types.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
#define IOTX_SDK_REVISION               "20200423.http2-fix-storeid-missing-issue"
#define IOTX_SDK_VERSION                "3.0.1"
#define DEV_SIGN_SOURCE_MAXLEN          (200)
#define DEV_SIGN_HOSTNAME_MAXLEN        (256)
#define DEV_SIGN_CLIENT_ID_MAXLEN       (200)
#define DEV_SIGN_USERNAME_MAXLEN        (64)
#define DEV_SIGN_PASSWORD_MAXLEN        (65)
*/



#define NETWORK_ADDR_LEN                (16)
#define HAL_MAC_LEN                     (17 + 1)    /* MAC地址的长度 */
#define STR_SHORT_LEN                   (32)



typedef enum TC_RETURN_CODES {
    ERROR_DEVICE_NOT_EXIST = -311,
    ERROR_NET_TIMEOUT = -310,
    ERROR_CERT_VERIFY_FAIL  = -309,
    ERROR_NET_SETOPT_TIMEOUT = -308,
    ERROR_NET_SOCKET = -307,
    ERROR_NET_CONNECT = -306,
    ERROR_NET_BIND = -305,
    ERROR_NET_LISTEN = -304,
    ERROR_NET_RECV = -303,
    ERROR_NET_SEND = -302,
    ERROR_NET_CONN = -301,
    ERROR_NET_UNKNOWN_HOST = -300,

    ERROR_REPLY_TIMEOUT = -6099, /**< recieve reply timeout*/
    ERROR_DEVICE_NOT_FOUND = -6100, /**< device not found*/
    ERROR_TOO_LARGE_PAGE_SIZE = -6101, /**< page size must less than 200*/

    ERROR_NO_MEM = -1016,
    ERROR_CERTIFICATE_EXPIRED = -1015,
    ERROR_MALLOC = -1014,
    ERROR_NO_ENOUGH_MEM = -1013,               /**< Writes more than size value. */

    ERROR_NETWORK_ERROR = -14,

    ERROR_NO_SUPPORT = -12,
    ERROR_NO_SUPPORT_CMD_TYPE = -11,
    ERROR_NULL_VALUE = -9,
    NULL_VALUE_ERROR = -2,

    FAIL_RETURN = -1,                        /**< generic error. */
    SUCCESS_RETURN = 0,

} tc_err_t;




#ifdef __cplusplus
}
#endif
#endif

